<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class Editassign extends Controller {
    function Editassign() {
        parent::Controller();
    }
    function index() {

    }
    //添加课业
    function addAssign() {
    //作业标题
        $this->assignname=$_POST['assignname'];
        //作业介绍
        $this->assigninfo=$_POST['assigninfo'];
        //所属课程
        $this->belongtocourse=$_POST['belongtocourse'];
        //针对班级
        $this->pointclass=$_POST['pointclass'];
        //下发日期
        $this->createtime=$_POST['createtime'];
        //截止日期
        $this->closetime=$_POST['closetime'];

        $data=array(
                    'assignname'=> $this->assignname,
                    'assigninfo'=>$this->assigninfo,
                    'createtime'=>$this->createtime,
                    'closetime'=>$this->closetime
                    );
        $this->db->insert('assign', $data);
        echo $this->db->affected_rows();
       
    }
}
?>
